<?php
define("JL", 1);

@session_start();

// Includes obligatorios
include ('./dbconfig.php');
include ('./administration/Libraries/Tools/JLTools.class.php');
$jl = JLTools::getInstance();

$SQL = "SELECT 
  tbl_actualites.int_actualite,
  tbl_actualites.var_ac_title,
  tbl_actualites.txt_content_actualite,
  tbl_actualites.var_monthyear,
  tbl_actualites.dat_creation_act,
  tbl_actualites.int_vote,
  tbl_sections.var_desc_section,
  tbl_sections.int_id_section,
  tbl_states.var_htmldesc
FROM
  tbl_sections
  INNER JOIN tbl_actualites ON (tbl_sections.int_id_section = tbl_actualites.int_id_section)
  INNER JOIN tbl_states ON (tbl_actualites.int_id_state = tbl_states.int_id_state)
WHERE tbl_actualites.int_id_state <> 3
ORDER BY tbl_actualites.int_actualite DESC
LIMIT 400";

$res = mysql_query($SQL, $cnn);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-FR" lang="fr-FR" >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="content-language" content="fr" /> 
        <meta http-equiv="pragma" content="no-cache" />
        <meta name="robots" content="index, follow" />
        <meta name="author" content="CSME - Club Sportif Multisections d'épinay-sur-seine" />
        <meta name="keywords" content="club sportif, multisections d'épinay-sur-seine, arts martiaux, athlétisme, basket, boule, spinassienne, boxe, française, colombophilie, culturisme, cyclisme, cyclotourisme, échecs, escalade, escrime, gym, entretien, gym, tonic, artistique, marche, randonnée, muay thaï, natation, pétanque, plongée, sous, marine, tennis, tir a l'arc, volley, ball, yoga, sports, adhésion, compétitions, résultats, actualités, informations, sportives français, paris, france, sections" />
        <meta name="description" content="Le CSME Club Sportif Multisections d'épinay-sur-seine. Le CSME, c'est un peu tout cela à la fois: une fédération d'associations sportives aussi performantes que conviviales, dont les membres s'efforcent de proposer aux Spinassiennes et aux Spinassiens la meilleure offre d'activités possible." />
        <meta name="classification" content="Club Sportif"/>
        <meta name="copyright" content="Copyright 2009-2013, CSME - Club Sportif Multisections d'épinay-sur-seine."/>
        <meta name="language" content="fr-R" />
        <meta name="revisit-after" content="1 week"/>
        <meta name="rating" content="general"/>
        <meta name="distribution" content="global"/>
        <meta name="google-site-verification" content="l6Fc4-_RGKeL_0Y8H7wAhDHge8ORqjoSkWeN2WQQzrU" />
        <meta name="generator" content="LBN | Design & Development Studio" />
        <title>CSME Club Sportif Multisections d'Epinay-sur-Seine</title>
        <link href="js/lib/flexslider.css" rel="stylesheet" type="text/css" media="screen, projection" />
        <link href="base.css" rel="stylesheet" type="text/css" media="all" />
        <!--[if IE]>
        <style>.submitimagehidden{ margin-left:160px; margin-top:43px; }</style>
        <![endif]-->
        <!--[if IE 7]>
        <link href="base-ie7.css" rel="stylesheet" type="text/css" media="screen, projection" />
        <![endif]-->
        <link href="slider/stylesheets/slider-popup.css" rel="stylesheet" type="text/css" media="screen, projection" />
        <link href="js/lib/xpopup/xpopup-1.0.css" rel="stylesheet" type="text/css" media="screen, projection" />

<!--<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>-->
        <script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.7.1.min.js"%3E%3C/script%3E'))</script>
        <script type="text/javascript" src="slider/javascripts/jquery.coda-slider-2.0.js"></script>
        <script type="text/javascript" src="slider/javascripts/jquery.easing.1.3.js"></script>
        <script type="text/javascript" src="js/lib/xpopup/xpopup.min-1.0.js"></script>
        <script type="text/javascript" src="js/lib/jquery.xvalidator-1.0.min.js"></script>
        <script type="text/javascript" src="js/lib/utils-1.0.min.js"></script>
        <script type="text/javascript" src="js/lib/jquery.tooltip.min.js"></script>
        <script type="text/javascript" src="js/lib/jquery.cookie.min.js"></script>
        <script type="text/javascript" src="js/lib/jquery.flexslider-min.js"></script>
        <script type="text/javascript" src="administration/?act=required"></script>
        <link rel="shortcut icon" href="favicon.ico" />
        <link rel="alternate" type="application/rss+xml" title="CSME Actualitès - RSS Feed" href="http://feed.csme.fr/" />
    </head>
    <body>

        <?php include 'modules/annonce.html.php'; ?>

        <div id = "button_top">
            <a href = "javascript:;"><img src = "images/arrow_top.png" width = "18" height = "25" />
                <span id = "top">TOP <br /><strong>SITE</strong></span>
            </a>
        </div>


        <div id="main-container" class="accueil">

            <!--ACTUALITES-->
            <div id = "actualites">
                <div class = "container">
                    <div id = "act-controls" class = "header">
                        <strong>Ça bouge au</strong><br />
                        <em>Club Sportif Multisections d’Epinay-sur-Seine !</em>
                    </div>

                    <div class = "flexslider">
                        <ul class = "slides">
                            <?php
                            $sql = "
                    SELECT 
                      var_monthyear
                    FROM 
                      tbl_actualites
                    WHERE int_id_section < 3 AND int_id_section <> 0 AND int_id_state <> 3
                    GROUP BY var_monthyear
                    ORDER BY int_actualite DESC
                    LIMIT 300";

                            $resr = mysql_query($sql, $cnn);
                            $ord = 1;

                            while ($fila = mysql_fetch_assoc($resr)):
                                $groupmonth[$fila['var_monthyear']] = $ord;
                                $ord++;
                            endwhile;

                            $t = mysql_num_rows($res);
                            $i = 1;

                            while ($row = mysql_fetch_assoc($res)):
                                $ide = intval(trim($row['int_id_section'])) - 2;
                                $idact = $row['int_actualite'];

                                $sql = "
                                SELECT 
                                  COUNT(`int_id_gallery`) AS 'num_gall'
                                FROM 
                                  `tbl_gallery`
                                WHERE `int_id_sections_view` = $ide
                                AND `int_id_state` <> 3 
                                AND `bol_admin` = 0 AND `int_num_photos` > 0
                                LIMIT 1";

                                $resk = mysql_query($sql, $cnn);
                                $rowk = mysql_fetch_assoc($resk);

                                $_t = (intval($rowk['num_gall']) > 0) ? intval($rowk['num_gall']) + 5 : 5;
                                $_url = ($ide <= 0) ? 'actualites.html?act=' . $idact . '#' . $groupmonth[$row['var_monthyear']] :
                                        'section.html?id=' . $ide . "&act=" . $idact . "#" . $_t;

                                $title = $row['var_ac_title'];
                                $date = $row['dat_creation_act'];
                                $section = $row['var_desc_section'];
                                $desciption = $jl->shorterString(strip_tags($row['txt_content_actualite']), 180);
                                ?>

                                <li class="actualite-item">
                                    <div class="actualite-wrap">
                                        <em><?php echo $date; ?></em>
                                        <strong class="section"><?php echo $section; ?></strong>
                                        <h3><?php echo $title; ?></h3>
                                        <p><?php echo $desciption; ?></p>
                                        <a class="buttonlink bxshd" href="<?php echo $_url; ?>">lire la suite</a>
                                    </div>
                                </li>

                                <?php
                                if ($t != $i):
                                    ?>

                                    <?php
                                    $i++;
                                endif;
                            endwhile;
                            ?>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- END ACTUALITES -->

            <!-- BN-TOP -->
            <div id="bn-top" class="bxshd">

                <!-- MENU-TOP -->
                <div class="menu-top">

                    <!-- NEWSLETTER -->
                    <div id="newsletter" class="bxshd">
                        <div class="newscenter">
                            <div class="newscontent">
                                <h3><img src="images/sobre.png" width="16" height="12" /> Newsletter</h3>
                                <div class="subtitle">Inscrivez-vous à notre newsletter.</div>
                                <div><form action="./" method="post" enctype="application/x-www-form-urlencoded" name="frmnewsletter" id="frmnewsletter">
                                        <input name="txtnom" type="text" class="txtnewsletter" id="txtnom" autocomplete="off" />
                                        <label id="email">
                                            <input name="txtemail" type="text" class="txtnewsletter" id="txtemail" autocomplete="off" />
                                            <input class="valid" type="submit" value="OK" onfocus="this.blur();" />
                                        </label>
                                    </form>
                                </div>


                                <div id="partenaires">

                                    <div class="face_fb_plugin"><a title="Suivez-nous sur facebook" target="_blank" href="http://www.facebook.com/CSMEpinaysurSeine"></a></div>
                                    <div class="text_fb_plugin">Soyez le premier parmi vos amis.
                                        <br />Rejoignez-nous vite !
                                    </div>
                                    <div class="fb_like_plugin">
                                        <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCSME-Club-Sportif-Multisections-dEpinay-sur-Seine%2F176399182395742&amp;layout=button_count&amp;locale=fr_FR&amp;show_faces=false&amp;width=170&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:170px; height:21px;" allowTransparency="true"></iframe>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- END NEWSLETTER -->

                    <div id="logo">
                        <a href="./" title="CSME Club Sportif Multisections d'Epinay-sur-Seine"><img alt="CSME LOGO" src="images/csme-logo.png" width="174" height="159" /></a>
                    </div>

                    <!-- MENU -->
                    <ul>
                        <li><a class="link selected" title="Accueil" href="./"  target="_parent">Accueil</a></li>
                        <li><a class="link" title="Présentation" href="presentation.html"  target="_parent">Présentation</a></li>
                        <li><a class="link" title="Les sections"  target="_parent" id="les_sections_id">Les sections</a>

                            <?php
                            include_once 'modules/menu.html.php';
                            printMenu($select);
                            ?>

                        </li>
                        <li><a class="link" title="Actualités" href="actualites.html" target="_parent">Actu. CSME</a></li>
                        <li><a class="link" title="Administration" href="administration.html" target="_parent">Administration</a></li>
                        <li><a class="link" title="Contact" href="contacts.html" target="_parent">Contact</a></li>
                    </ul>
                    <!-- END MENU-->


                </div>
                <!-- END MENU-TOP -->

            </div>
            <!-- END BN-TOP -->


            <!-- BN-CONTENT-->

            <div id="bn-content">

                <!-- BN-BGN-IMAGE-->
                <div id="bgn-image"></div>
                <!-- END BN-BGN-IMAGE-->

                <div id="push"></div>

            </div>


        </div>

        <?php
        include 'modules/footer.html.php';
        printFooter($cnn, 0, TRUE);
        ?>

        <script type="text/javascript" src="js/js-main.js"></script>
        <?php
        printMyVisites();
        @mysql_close();
        ?>
    </body>
</html>